home *** CD-ROM | disk | FTP | other *** search
- /*
- * $
- * $ FILE : egsblit.doc
- * $ VERSION : 1
- * $ REVISION : 1
- * $ DATE : 08-Feb-93 10:03
- * $
- * $ Author : mvk
- * $
- *
- *
- * (c) Copyright 1990/93 VIONA Development
- * All Rights Reserved
- *
- */
- egsblit.library/EB_BitAreaCircle
- egsblit.library/EB_BitAreaPolygon
- egsblit.library/EB_CopyBitMap
- egsblit.library/EB_CopyBitMapClipped
- egsblit.library/EB_Draw
- egsblit.library/EB_DrawClipped
- egsblit.library/EB_FillMask
- egsblit.library/EB_FillMaskClipped
- egsblit.library/EB_FloodFill
- egsblit.library/EB_InvertPixel
- egsblit.library/EB_InvertRectangle
- egsblit.library/EB_ReadPixel
- egsblit.library/EB_RectangleClipped
- egsblit.library/EB_RectangleFill
- egsblit.library/EB_UnpackImage
- egsblit.library/EB_Write
- egsblit.library/EB_WriteClipped
- egsblit.library/EB_WritePixel
-
-
- egsblit.library/EB_BitAreaCircle
-
- NAME
- EB_BitAreaCircle Draw circle in one bit deep map
-
- SYNOPSIS
- EB_BitAreaCircle(dst, radius)
- A0 D0
-
- E_EBitMapPtr dst;
- UWORD radius;
-
- FUNCTION
- Draw a circle in a one bit deep map. The dimensions of the map are modified
- to fit the circle. The result can be used for EB_FillMask or
- EB_FillMaskClipped.
-
- INPUTS
- radius : radius of desired circle
-
- RETURNS
-
-
- egsblit.library/EB_BitAreaPolygon
-
- NAME
- EB_BitAreaPolygon Draw polygon in one bit deep map
-
- SYNOPSIS
- EB_BitAreaPolygon(dst, poly, range, width, height)
- A0 A1 D0 D1 D2
-
- E_EBitMapPtr dst;
- EB_PolygonPtr poly;
- UWORD range, width, height;
-
- FUNCTION
- Draws a one bit deep polygon in a map. Modifies the dimensions of the map
- to fit the requierements of the polygon. The result can be used for
- FillMask or FillMaskClipped. To draw several polygons at once, or holes in
- polygons you can link them (p0-p1-p2-q0-q1-q2-q3-p2-p3)
-
- INPUTS
- poly : Pointer to array of coordinate pairs. The coordinates should
- be alligned to the upper left border.
- range : Number of vertices.
- width, height : Dimensions of polygon
-
- RETURNS
-
-
- egsblit.library/EB_CopyBitMap
-
- NAME
- EB_CopyBitMap Copy rectangle from bitmap to bitmap
-
- SYNOPSIS
- EB_CopyBitMap(src, dst, xs, ys, width, height, xd, yd, mask)
- A0 A1 D0 D1 D2 D3 D4 D5 D6
-
- E_EBitMapPtr src, dst;
- WORD xs, ys, width, height, xd, yd;
- ULONG mask;
-
- FUNCTION
- Copies a rectangular area from one bitmap to an other (or the same). No
- clipping is performed either on source neither on destination. If source
- bitmap is a real color map (24 Bits) and the destination is not, a
- conversion will be done. This function may also be used, to make conversions
- between different bitmap types.
-
- The function will certainly be replaced by a blitter, i.e. it should be used
- in any case. "width" and "height" have the same meaning as for
- "EB_RectangleFill".
-
- INPUTS
- src : Source bitmap
- dst : Destination bitmap
- xs, ys : Location of source rectangle
- width, height : Dimensions of rectangle
- xd, yd : Location of destination rectangle
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_CopyBitMapClipped
-
- NAME
- EB_CopyBitMapClipped Copy rectangle from bitmap to bitmap clipped
-
- SYNOPSIS
- EB_CopyBitMapClipped(src, dst, rect, xs, ys, width, height, xd, yd, mask)
- A0 A1 A2 D0 D1 D2 D3 D4 D5 D6
-
- E_EBitMapPtr src, dst;
- EB_ClipRectPtr rect;
- WORD xs, ys, width, height, xd, yd;
- ULONG mask;
-
- FUNCTION
- Copies a rectangluar area from a bitmap to an other (or the same). Clipping
- is performed through the cliprect. If source bitmap is a real color map
- (24 Bits) and the destination is not, a conversion will be done.
-
- INPUTS
- src : Source bitmap
- dst : Destination bitmap
- xs, ys : Location of source rectangle
- width, height : dimensions of rectangle
- xd, yd : location of destination rectangle
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_Draw
-
- NAME
- EB_Draw Draw line
-
- SYNOPSIS
- EB_Draw(map, c, x1, y1, x2, y2, mask)
- A0 D0 D1 D2 D3 D4 D5
-
- E_EBitMapPtr map;
- ULONG c;
- WORD x1, y1, x2, y2;
- ULONG mask;
-
- FUNCTION
- Draws a line of color c into a bitmap. If the color is a 24Bit color
- (using the heigher 24Bits, but not the lower eight) and the bitmap is no
- real color map, the next matching color is chosen. No clipping is performed.
-
- The function uses a modified Bresenham algorithm for ultimate speed and will
- certainly be replaced by a blitter. This means it should be used in any
- case.
-
- INPUTS
- map : map in which to render
- c : color, -1 to invert
- x1, y1 : starting position
- x2, y2 : ending position
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_DrawClipped
-
- NAME
- EB_DrawClipped Draw line clipped
-
- SYNOPSIS
- EB_DrawClipped(map, rect, c, x1, y1, x2, y2, mask)
- A0 A1 D0 D1 D2 D3 D4 D5
-
- E_EBitMapPtr map;
- EB_ClipRectPtr rect;
- ULONG c;
- WORD x1, y1, x2, y2;
- ULONG mask;
-
- FUNCTION
- Draw a line into a bitmap (see also EB_Draw). Clipping is performed using
- the cliprect. The function only clips in one cliprect. To render through
- a list of cliprects, you should call this function once for every cliprect.
- The function respects the remainder when clipping, so if using several
- cliprects, the line is not broken at borders.
-
- INPUTS
- map : bitmap in which to render
- rect : cliprect for clipping
- c : color, -1 to invert
- x1, y1 : starting position
- x2, y2 : ending position
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_FillMask
-
- NAME
- EB_FillMask Fill rectangle in bitmap through one pixel deep map
-
- SYNOPSIS
- EB_FillMask(mask, dst, pattern, x, y, mask2)
- A0 A1 A2 D0 D1 D2
-
- E_EBitMapPtr mask, dst;
- EB_ImageDesPtr pattern;
- WORD x, y;
- ULONG mask2;
-
- FUNCTION
- Fills a rectangluar area with one or two colors, depending on a mask.
- The size and location in the mask of the rectangle is described in
- pattern. If the colors described in pattern are 24bit colors and the map
- is no 24bit map, this function renders with color patterns, to simulate
- 24 bits.
- The function serves as basic function for Amiga fonts and Area commands.
-
- INPUTS
- mask : mask bitplane
- dst : destinaton bitmap
- pattern : description of source rectangle and colors
- x, y : destination location
- mask2 : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_FillMaskClipped
-
- NAME
- EB_FillMaskClipped Fill rectangle clipped through one bit deep mask
-
- SYNOPSIS
- EB_FillMaskClipped(mask, dst, pattern, clip, x, y, mask2)
- A0 A1 A2 A3 D0 D1 D2
-
- E_EBitMapPtr mask, dst;
- EB_ImageDesPtr pattern;
- EB_ClipRectPtr clip;
- WORD x, y;
- ULONG mask2;
-
- FUNCTION
- Same as fill mask, but clipping is performed according to the cliprect.
-
- INPUTS
- mask : mask bitplane
- dst : destinaton bitmap
- pattern : description of source rectangle and colors
- clip : cliprect
- x, y : destination location
- mask2 : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_FloodFill
-
- NAME
- EB_FloodFill Fill connected area in bitmap
-
- SYNOPSIS
- EB_FloodFill(dst, clip, color, x, y, mode)
- A0 A1 D0 D1 D2 D3
-
- E_EBitMapPtr dst;
- EB_ClipRectPtr clip;
- ULONG color;
- WORD x, y;
- ULONG mode;
-
- FUNCTION
- Fills a consecutive area of pixels, the cliprect serves as additional border,
- if the area is open to the verge. If mode is set to zero then then that
- segement is filled which has the color of the starting point, else that
- segment is filled, which is surrounded by the fill color.
-
- INPUTS
- dst : Destination bitmap
- clip : cliprect
- color : fillcolor
- x, y : starting location
-
- RETURNS
-
-
- egsblit.library/EB_InvertPixel
-
- NAME
- EB_InvertPixel Invert a pixel
-
- SYNOPSIS
- EB_InvertPixel(map, x, y)
- A0 D0 D1
-
- E_EBitMapPtr map;
- WORD x, y;
-
- FUNCTION
- Inverts a pixel. Double usage of this function using same parameters will
- result in no effect.
-
- INPUTS
-
- RETURNS
-
-
- egsblit.library/EB_InvertRectangle
-
- NAME
- EB_InvertRectangle Invert the border of a rectangle
-
- SYNOPSIS
- EB_InvertRectangle(map, left, top, right, bottom)
- A0 D0 D1 D2 D3
-
- E_EBitMapPtr map;
- WORD left, top, right, bottom;
-
- FUNCTION
- Inverts the border of a rectangle. Double usage of this function using same
- parameters will result in no effect. Should be used for mouse dragging
- operations. This function is used by EGSIntui to move and resize windows.
- Clipping is performed at the bitmap borders.
-
- INPUTS
-
- RETURNS
-
-
- egsblit.library/EB_ReadPixel
-
- NAME
- EB_ReadPixel get the color of a pixel
-
- SYNOPSIS
- color = EB_ReadPixel(map, x, y)
- D0 A0 D0 D1
-
- ULONG color;
- E_EBitMapPtr map;
- WORD x, y;
-
- FUNCTION
- Returns the color of a pixel. In pseudo modes this is the register number
- in real mode its the color itself (RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx).
- To allways get the real color use this:
-
- E_MouseOff(scr);
- if (scr->map->depth<16)
- color = E_GetRGB8(scr,EB_ReadPixel(scr->map,x,y));
- else
- color = EB_ReadPixel(scr->map,x,y);
- E_MouseOn(scr);
-
- Reads a pixel's colour. This function is certainly not accelerated by a
- blitter. Should be used for reasons of compatibility when using several
- bit depths or when support of any new graphics card without software
- modification is wanted.
-
- Obviously for 8 or 24 bit mode more direct techniques are recommended.
-
- INPUTS
- map : pointer to the bitmap
- x, y : pixel coordinates in the map
-
- RETURNS
- the color, either a register value or a real color value, depending on
- the mode
-
-
- egsblit.library/EB_RectangleClipped
-
- NAME
- EB_RectangleClipped Fill rectangle clipped
-
- SYNOPSIS
- EB_RectangleClipped(map, rect, c, left, top, width, height, mask)
- A0 A1 D0 D1 D2 D3 D4 D5
-
- E_EBitMapPtr map;
- EB_ClipRectPtr rect;
- ULONG c;
- WORD left, top, width, height;
- ULONG mask;
-
- FUNCTION
- Same as EB_RectangleFill, but clipping is done using the cliprect.
-
- INPUTS
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_RectangleFill
-
- NAME
- EB_RectangleFill Fill rectangle
-
- SYNOPSIS
- EB_RectangleFill(map, c, left, top, width, height, mask)
- A0 D0 D1 D2 D3 D4 D5
-
- E_EBitMapPtr map;
- ULONG c;
- WORD left, top, width, heigth;
- ULONG mask;
-
- FUNCTION
- Fills a rectangular area in a bitmap. If the color is a 24 bit color, but the
- bitmap is not 24 bit deep, the function fills with a color pattern to
- simulate 24 bits.
- "width" and "height" describe the real width and height in pixels, i.e.
- a one-pixeled rectangle has width=height=1.
-
- This function will certainly be replaced by a blitter and therefore should
- be used in any case.
-
- INPUTS
- map : bitmap in which to fill
- c : color, -1 to invert
- left, top : uppper left corner of rectangle
- width, height : dimensions of rectangle
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_UnpackImage
-
- NAME
- EB_UnpackImage convert image to bitmap
-
- SYNOPSIS
- map = EB_UnpackImage(image, depth, colors)
- D0 A1 D0 A2
-
- E_EBitMapPtr map;
- EB_ImagePtr image;
- UWORD depth;
- EB_ColorTablePtr colors;
-
- FUNCTION
- As the egs libraries work in different bit depths, and bitmap organisations,
- there has to be an standardized format for icon, images etc. This format
- is defined in EB_Image. The aim of this function is to convert from this
- format to a bitmap. This function also allocates a bitmap in fast mem.
-
- INPUTS
- image : Image to convert
- depth : depth for destination
- colors : array of colors to use for conversion
-
- RETURNS
-
-
- egsblit.library/EB_Write
-
- NAME
- EB_Write write text in build in font
-
- SYNOPSIS
- EB_Write(map, color, x, y, str, len, mask)
- A0 A2 D0 D1 A3 D2 D3
-
- E_EBitMapPtr map;
- EB_ColorDesPtr color;
- WORD x, y;
- CHAR * str;
- UWORD len;
- ULONG mask;
-
- FUNCTION
- Renders a text into a bitmap, using a build in 8x10 non proportional font.
- This function is faster than the EB_UnpackImage which is used by EG_Text, to
- render amiga fonts.
- If your programs use lots of text and have no extraordinary font require-
- ments you should use this font.
-
- INPUTS
- map : destination bitmap
- color : description of front and back color and transparency
- x, y : starting location
- str : text
- len : length of text
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_WriteClipped
-
- NAME
- EB_WriteClipped write text clipped in build in font
-
- SYNOPSIS
- EB_WriteClipped(map, rect, color, x, y, str, len, mask)
- A0 A1 A2 D0 D1 A3 D2 D3
-
- E_EBitMapPtr map;
- EB_ClipRectPtr rect;
- EB_ColorDesPtr color;
- WORD x, y;
- CHAR * str;
- UWORD len;
- ULONG mask;
-
- FUNCTION
- Same as EB_Write, but clipping is performed using the cliprect.
-
- INPUTS
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
- egsblit.library/EB_WritePixel
-
- NAME
- EB_WritePixel set a pixel
-
- SYNOPSIS
- EB_WritePixel(map, c, x, y, mask)
- A0 D0 D1 D2 D3
-
- E_EBitMapPtr map;
- ULONG c;
- WORD x, y;
- ULONG mask;
-
- FUNCTION
- Writes pixel into a bitmap. If the color is 24 bit color but the bitmap is
- not the library simulates a 24 bit bitmap, using patterns. See also
- EB_ReadPixel.
-
- INPUTS
- mask : Bit mask for operation. Bits which are set in mask
- are not modified. (Not implemented yet, should be
- zero for future compatibility)
-
- RETURNS
-
-
-